#include <iostream>
using namespace std;
int main ()

{
   string palabra1;
   char letra;

    cout << "Ingrese la primer palabra: ";
    cin >> palabra1;
    letra = palabra1[0];

    palabra1 [0] = palabra1 [palabra1.length ()-1];

    palabra1 [palabra1.length ()-1] = letra ;

    cout << palabra1;






return 1;

}
